package com.dnjn.happiness.system.api.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 人员架构对象 sys_team
 * 
 * @author amber
 * @date 2024-01-02
 */
@Schema(name = "SysTeam", description = "人员架构")
@Accessors(chain = true)
@Getter
@Setter
@ToString
@TableName("sys_team")
public class SysTeam extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "team_id", type = IdType.ASSIGN_ID)
    private Long teamId;


    /** 是否删除 */
    private String deleted;

    /** 邀请码 */
    private String inviteCode;

    /** 上一级 sys_team.team_id */
    private Long parentId;

    /** 上一级 名称 */
    @TableField(exist = false)
    private String parentName;

    /** 团队总人数 */
    private Integer memberTotal;

    /**  */
    private Integer level;

    /**  */
    private Long userId;

    /** 名称 */
    @TableField(exist = false)
    private String nickName;

    /** 头像 */
    @TableField(exist = false)
    private String avatar;

    /** 上两级 sys_team.team_id */
    private Long superId;

    @TableField(exist = false)
    private List<SysTeam> Children;

    /**
     * 今日是否打卡
     */
    @TableField(exist = false)
    private Boolean hasClockIn;

    /**
     * 七天内是否评价
     */
    @TableField(exist = false)
    private Boolean hasAppraise;

    /**
     * 评价倒计时
     */
    @TableField(exist = false)
    private String countdown;

    @TableField(exist = false)
    private String teamName;

    @Schema(description = "考核时间")
    private LocalDateTime checkTime;

    private LocalDateTime appraiseTime;


    /**
     * 30天内是否考核
     */
    @Schema(description = "是否可以考核,true可以考核,false没有超过30天,不可以考核")
    @TableField(exist = false)
    private Boolean hasCheck;


}
